﻿<%@ Page Language="C#"  AutoEventWireup="true" Inherits="Pages_PlaceInsert" Codebehind="PlaceInsert.aspx.cs" MasterPageFile="~/Pages/Master/MainAdmin.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <script src="../../JavaScript/FieldFormatters.js" type="text/javascript"></script>
        <fieldset id="pageLoad">
        <div id="fillInData">
           <h1>Cadastro de Locais</h1>
           <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                CssClass="validation message" />

           <div class="fillInDataField">
                <div class="label">
                    <label for="txbDescription">Descrição</label>
                </div>
                <asp:TextBox ID="txbDescription" runat="server" CssClass="component medium" MaxLength="50"></asp:TextBox>
           </div>

           <div class="fillInDataField">
                <div class="label">
                    <label for="ddlState">Estado</label>
                </div>
                    <asp:DropDownList ID="ddlState" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="ddlState_SelectedIndexChanged" 
                    CssClass="component small">
                    </asp:DropDownList>
           </div>
           
           <div class="fillInDataField">
                <div class="label">
                    <label for="ddlCity">Cidade</label>
                </div>
                <asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True" 
                    CssClass="component small">
                </asp:DropDownList>
           </div>

           <div class="fillInDataField">
                <div class="label">
                    <label for="txbZip">CEP</label>
                </div>
                <asp:TextBox ID="txbZip" runat="server" CssClass="component small" OnKeyUp="formatCEP(this, event);" MaxLength="9"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv1" runat="server" 
                    ControlToValidate="txbZip" ErrorMessage="Preencha o CEP." 
                    CssClass="validation">*</asp:RequiredFieldValidator>
           </div>

           <div class="fillInDataField">
                <div class="label">
                    <label for="txbAddress">Endereço</label>
                </div>
                <asp:TextBox ID="txbAddress" runat="server" CssClass="component medium" MaxLength="100"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv" runat="server" 
                    ControlToValidate="txbAddress" ErrorMessage="Preencha o endereço." 
                    EnableTheming="True" CssClass="validation">*</asp:RequiredFieldValidator>
            </div>

            <div class="fillInDataField">
                <div class="label">
                    <label for="txbComplement">Complemento</label>
                </div>
                <asp:TextBox ID="txbComplement" runat="server" CssClass="component" MaxLength="100"></asp:TextBox>
            </div>

            <div class="fillInDataField">
                <div class="label">
                    <label for="txbNumber">Número</label>
                </div>
                <asp:TextBox ID="txbNumber" runat="server" CssClass="component small" OnKeyUp="formatInteger(this, event);"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv3" runat="server" 
                    ControlToValidate="txbNumber" ErrorMessage="Preencha o número." 
                    CssClass="validation">*</asp:RequiredFieldValidator>
            </div>
                                
            <asp:Button ID="btnInsert" runat="server" onclick="btnInsert_Click" 
                Text="Cadastrar" CssClass="button add" />
        </div>
        </fieldset>
</asp:Content>